from PIL import Image, ImageDraw, ImageFont

size = 256
rct = 64

image = Image.new('RGBA', (size, size), (0, 0, 0, 0))

draw = ImageDraw.Draw(image)

for i in range(0, size, rct):
    for j in range(0, size, rct):
        if (i + j) % (rct * 2) == 0:
            #print(str(i) + ', ' + str(j))
            draw.rectangle((i, j, i + rct - 1, j + rct - 1), outline='red', fill='orange')
        draw.text((i + 10, j + rct / 2 - 4), str(i) + ', ' + str(j), fill='yellow')

image.save('grid.png')
print('Done.')
